class Person {

}
// 混入类方法1
function mixinClass(BaseClass) {
  class NewClass extends BaseClass {
    running() {
      console.log("running")
    }
  }
  return NewClass
}
// 混入类方法2
function mixinEater(BaseClass) {
  // 匿名类
  return class extends BaseClass {
    eating() {
      console.log("eating~")
    }
  }
}
// 在JS中类只能有一个父类：单继承
class Student extends Person {

}

var NewStudent = mixinEater(mixinClass(Student))
var ns = new NewStudent()
ns.running()
ns.eating()